package com.qiwenshare.stock;

import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.Environment;
import org.springframework.scheduling.annotation.EnableScheduling;

@Slf4j
@SpringBootApplication
@MapperScan("com.qiwenshare.stock.mapper")
@EnableScheduling  //启用定时任务
public class StockApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext configurableApplicationContext = SpringApplication.run(StockApplication.class, args);
        Environment environment = configurableApplicationContext.getBean(Environment.class);
        log.error("启动成功, port: {}", environment.getProperty("server.port"));
    }

}
